package cn.itcast.hotel.controller;
import cn.itcast.hotel.dto.PageResult;
import cn.itcast.hotel.dto.RequestParams;
import cn.itcast.hotel.service.IHotelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author by xiaoHu
 * @Date 2023/2/2 17:16
 * @Description controller层
 */
@RestController
@RequestMapping("/hotel")
public class HotelController {
    @Autowired
    IHotelService iHotelService;
    //搜索酒店数据
    @PostMapping("/list")
    public PageResult search(@RequestBody RequestParams params){
        return iHotelService.search(params);
    }
}
